//
//  SenioritySongsDataModel.m
//  NewMusic
//
//  Created by chuxinyu123 on 15/11/14.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "SenioritySongsDataModel.h"

@implementation SenioritySongsDataModel

- (void)dealloc
{
    [_name release];
    [_singerId release];
    [_singerName release];
    [_albumId release];
    [_albumName release];
    [_alias release];
    [_favorites release];
    [_type release];
    [_originalId release];
    [_ID release];
    [super dealloc];
}
- (instancetype)initWithDictionary:(NSDictionary *)dictionary
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}

+ (SenioritySongsDataModel *)senioritySongsDataModelWithDictionary:(NSDictionary *)dictionary
{
    SenioritySongsDataModel *senioritySongsDataModel = [[SenioritySongsDataModel alloc] initWithDictionary:dictionary];
    return [senioritySongsDataModel autorelease];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqual:@"id"]) {
        self.ID = [NSString stringWithFormat:@"%@", value];
    }
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqual:@"originalId"]) {
        self.originalId = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqual:@"albumId"]) {
        self.albumId = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqual:@"singerId"]) {
        self.singerId = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqual:@"type"]) {
        self.type = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqual:@"favorites"]) {
        self.favorites = [NSString stringWithFormat:@"%@", value];
    }else{
        [super setValue:value forKey:key];
    }
}


@end
